﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace NewRen.Models.ViewModel
{
    public class vJob
    {
        public int ID { set; get; }

        public string JobName { set; get; }

        public List<User> Users { set; get; }

        public List<UserGroup> UserGroups { set; get; }

        public vJob() { }

        public vJob(Job model)
        {
            DB db = new DB();
            this.ID = model.ID;
            this.JobName = model.JobName;
            this.Users = db.Users.Where(c => c.Job == model.JobName).Take(10).ToList();
        }
    }

}